package com.liuxinlong.jobs;

import com.liuxinlong.modules.dao.MaterialDao;
import com.liuxinlong.modules.entity.Material;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 使用quartz框架
 */
@Service
@Component("syncMaterialInfoTask")
public class SyncMaterialInfoTask {

    @Autowired
    private MaterialDao materialDao;

    /**
     * 业务逻辑
     */
    public void reptilian(){

        List<Material> materialList = materialDao.getMaterialList();
        for (Material material: materialList) {
//            String userKey = user.getId();
//            String token = redisUtils.getUserCache(userKey);
//            if (StringUtils.isEmpty(token) || StringUtils.isEmpty(token.trim())) {
////                redisUtils.deleteUserCache(userKey);
//                userDao.updateUserStatus(userKey,0,null);
//            }
        }

    }
}
